<include file="Public:basehead"/>  
<link rel="stylesheet" type="text/css" href="{cms>:RES}/css/cymain.css" />
<script src="{cms>:STATICS}/artDialog/jquery.artDialog.js?skin=default"></script>
<script src="{cms>:STATICS}/artDialog/plugins/iframeTools.js"></script>
<script>
function selectall(name) {
	var checkItems=$('.cbitem');
	if ($("#check_box").attr('checked')==false) {
		$.each(checkItems, function(i,val){
			val.checked=false;
		});
		
	} else {
		$.each(checkItems, function(i,val){
			val.checked=true;
		});
	}
}

function showIntroDetail(id){
	art.dialog.open('{cms>:U('Product/orderInfo',array('token'=>$token,'dining'=>$isDining))}&id='+id,{lock:false,title:'订单详情',width:700,height:420,yesText:'关闭',background: '#000',opacity: 0.87});
}
</script>
<div class="content">
	<div class="cLineB">
		<h4 class="left">分支机构</h4>
		<div class="searchbar right">
			<form method="post" action="">
			</form>
		</div>
		<div class="clr"></div>
	</div>
	<!--tab start-->
	<div class="tab">
		<ul>
		<li class="tabli" id="tab0"><a href="{cms>:U('Company/index',array('token'=>$token))}">公司信息</a></li>
		<li class="<if condition="$isBranch eq 1">current</if> tabli" id="tab2"><a href="{cms>:U('Company/branches',array('token'=>$token,'isBranch'=>1))}">分支机构</a></li>
		</ul>
	</div>
	<!--tab end-->
	<div class="msgWrap">
		<form method="post" action="" id="info">
			<div class="cLine">
				<div class="pageNavigator left"> <a href="{cms>:U('Company/index',array('token'=>$token,'isBranch'=>1))}" title="" class="btnGrayS vm bigbtn"><img src="{cms>:RES}/images/icons/add.png" class="vm">添加</a></div>
				<div class="clr"></div>
			</div>
			
			<table class="ListProduct" border="0" cellspacing="0" cellpadding="0" width="100%">
				<thead>
					<tr>
						<th class="select" style="display:none"><input type="checkbox" value="" id="check_box" onclick="selectall('id[]');"></th>
						<th width="70">名称</th>
						<th width="80">电话</th>
						<th width="160">地址</th>
						<th width="150" class="norightborder">操作</th>
					</tr>
				</thead>
				<tbody>
					<tr></tr>
					<volist name="branches" id="c"> 
						<tr>
							<td style="display:none"><input type="checkbox" value="{cms>$o.id}" class="cbitem" name="id_{cms>$i}"></td>
							<td>{cms>$c.name}</td>
							<td>{cms>$c.tel}</td>
							<td>{cms>$c.address}</td>
							<td class="norightborder"><a href="{cms>:U('Company/index',array('token'=>$token,'id'=>$c['id'],'isBranch'=>1))}">修改</a> <a href="javascript:drop_confirm('您确定要删除吗?', '{cms>:U('Company/delete',array('token'=>$token,'id'=>$c['id'],'isBranch'=>1))}');">删除</a></td>
						</tr>
					</volist>
				</tbody>
			</table>
			<input type="hidden" name="token" value="{cms>$_GET['token']}" />
		</form>
		
	</div>
	<div class="cLine">
	<div class="pageNavigator right">
	<div class="pages">{cms>$page}</div>
	</div>
	<div class="clr"></div>
	</div>
</div>
<div class="clr"></div>
<include file="Public:footer"/>